<template>
	<view class="policySettingMain">
		<view class="policySettingBox">
			<view class="policySettingOne">
				<u-cell-item icon="account-fill" title="代理商" :value="renderData.agentValue" :title-style="titleStyle"
					:value-style="valueStyle" @click="angentShowTap"></u-cell-item>
				<u-cell-item icon="bookmark-fill" title="产品名称" :value="renderData.productValue"
					:title-style="titleStyle" :value-style="valueStyle" @click="productShowTap"></u-cell-item>
			</view>
			<!-- <view class="tip">该代理商已设置政策，请不要重复设置</view> -->
			<u-sticky>
				<view class="tabBox">
					<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="tabChange"
						active-color="#fb4535" font-size="28"></u-tabs>
				</view>
			</u-sticky>
			<view class="policySettingTwo">
				<view class="title flex align-center" v-show="current == 0">
					<u-icon class="uIcon" name="setting-fill" color="#fb4535" size="48"></u-icon>
					费率设置
				</view>
				<view class="twoBox" v-show="current == 0">
					<view class="formItem solid-bottom flex align-center justify-between">
						<view class="left flex align-center">
							<view>贷记卡</view>
							<text>{{ renderData.dataProduct.ccpay }}%</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.ccpay" v-model="queryData.ccpay"
								@blur="inputBlur('ccpay',renderData.dataProduct.ccpay_max)" :focus="state.ccpay" maxlength="5"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('ccpay')"></u-icon>
						</view>
					</view>
					<view class="formItem solid-bottom flex align-center justify-between">
						<view class="left flex align-center">
							<view>借记卡</view>
							<text>{{ renderData.dataProduct.dcpay }}%</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.dcpay" v-model="queryData.dcpay"
								@blur="inputBlur('dcpay',renderData.dataProduct.dcpay_max)" :focus="state.dcpay" maxlength="5"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('dcpay')"></u-icon>
						</view>
					</view>
					<view class="formItem solid-bottom flex align-center justify-between">
						<view class="left flex align-center">
							<view>银联扫码</view>
							<text>{{ renderData.dataProduct.cuppay }}%</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.cuppay" v-model="queryData.cuppay"
								@blur="inputBlur('cuppay',renderData.dataProduct.cuppay_max)" :focus="state.cuppay" maxlength="5"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('cuppay')"></u-icon>
						</view>
					</view>
					<view class="formItem solid-bottom flex align-center justify-between">
						<view class="left flex align-center">
							<view>支付宝</view>
							<text>{{ renderData.dataProduct.alipay }}%</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.alipay" v-model="queryData.alipay"
								@blur="inputBlur('alipay',renderData.dataProduct.alipay_max)" :focus="state.alipay" maxlength="5"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('alipay')"></u-icon>
						</view>
					</view>
					<view class="formItem flex align-center justify-between">
						<view class="left flex align-center">
							<view>微信支付</view>
							<text>{{ renderData.dataProduct.wxpay }}%</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.wxpay" v-model="queryData.wxpay"
								@blur="inputBlur('wxpay',renderData.dataProduct.wxpay_max)" :focus="state.wxpay" maxlength="5"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('wxpay')"></u-icon>
						</view>
					</view>
					<view class="formItem solid-bottom flex align-center justify-between">
						<view class="left flex align-center">
							<view>借记卡封顶费</view>
							<text>{{ renderData.dataProduct.dctop }}元</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.dctop" v-model="queryData.dctop"
								@blur="inputBlur('dctop',renderData.dataProduct.dctop_max)" :focus="state.dctop" :maxlength="queryData.dctop>=10?5:4"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('dctop')"></u-icon>
						</view>
					</view>
				</view>
				<view class="title flex align-center" v-show="current == 0">
					<u-icon class="uIcon" name="rmb-circle-fill" color="#fb4535" size="48"></u-icon>
					提现设置
				</view>
				<view class="twoBox" v-show="current == 0" style="margin-bottom: 100rpx;">
					<view class="formItem flex align-center justify-between">
						<view class="left flex align-center">
							<view>T0手续费</view>
							<text>{{ renderData.dataProduct.t0 }}元</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.t0" v-model="queryData.t0"
								@blur="inputBlur('t0',renderData.dataProduct.t0_max)" :focus="state.t0" :maxlength="queryData.t0>=10?5:4"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('t0')"></u-icon>
						</view>
					</view>
				</view>
				<view class="title flex align-center" v-show="current == 1">
					<u-icon class="uIcon" name="red-packet-fill" color="#fb4535" size="44"></u-icon>
					返现设置
				</view>
				<view class="twoBox" v-show="current == 1">
					<view class="formItem solid-bottom flex align-center justify-between">
						<view class="left flex align-center">
							<view>激活返现</view>
							<text>{{ renderData.dataProduct.active_reward }}元</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.active_reward"
								v-model="queryData.active_reward"
								@blur="inputBlur('active_reward',renderData.dataProduct.active_reward_min)"
								:focus="state.active_reward" :maxlength="queryData.active_reward>=10?5:4"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('active_reward')">
							</u-icon>
						</view>
					</view>
					<view class="formItem solid-bottom flex align-center justify-between" v-if="renderData.dataProduct.standard_fee_1">
						<view class="left flex align-center">
							<view>达标返现1<u-icon class="uIcon" name="question-circle" color="#ccc" size="32" @click="showQustion('达标返现1条件',renderData.dataProduct.standard_fee_1_remard)"></u-icon></view>
							<text>{{ renderData.dataProduct.standard_fee_1 }}元</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.standard_fee_1"
								v-model="queryData.standard_fee_1"
								@blur="inputBlur('standard_fee_1',renderData.dataProduct.standard_fee_1)"
								:focus="state.standard_fee_1" :maxlength="queryData.standard_fee_1>=10?5:4"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('standard_fee_1')">
							</u-icon>
						</view>
					</view>
					<view class="formItem flex align-center justify-between" v-if="renderData.dataProduct.standard_fee_2">
						<view class="left flex align-center">
							<view>达标返现2<u-icon class="uIcon" name="question-circle" color="#ccc" size="32" @click="showQustion('达标返现2条件',renderData.dataProduct.standard_fee_2_remard)"></u-icon></view>
							<text>{{ renderData.dataProduct.standard_fee_2 }}元</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.standard_fee_2"
								v-model="queryData.standard_fee_2"
								@blur="inputBlur('standard_fee_2',renderData.dataProduct.standard_fee_2)"
								:focus="state.standard_fee_2" :maxlength="queryData.standard_fee_2>=10?5:4"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32" @click="inputTap('standard_fee_2')">
							</u-icon>
						</view>
					</view>
				</view>
				<view class="title flex align-center" v-show="current == 2">
					<u-icon class="uIcon" name="bookmark-fill" color="#fb4535" size="44"></u-icon>
					流量卡设置
				</view>
				<view class="twoBox" v-show="current == 2">
					<view class="formItem flex align-center justify-between">
						<view class="left flex align-center">
							<view>流量卡返现</view>
							<text>{{ renderData.dataProduct.service_data_fee }}元</text>
						</view>
						<view class="right flex align-center">
							<input type="digit" :placeholder="renderData.dataProduct.service_data_fee"
								v-model="queryData.service_data_fee"
								@blur="inputBlur('service_data_fee',renderData.dataProduct.service_data_fee_min)"
								:focus="state.service_data_fee" :maxlength="queryData.service_data_fee>=10?5:4"/>
							<u-icon name="edit-pen-fill" color="#fb4535" size="32"
								@click="inputTap('service_data_fee')"></u-icon>
						</view>
					</view>
				</view>
				<view class="oButtonBox">
					<button type="default" @click="nextStepTap(1)" v-show="current == 0" :disabled="canNext">下一步</button>
					<button type="default" @click="nextStepTap(2)" v-show="current == 1" :disabled="canNext">下一步</button>
					<button type="default" @click="submitRateTap" v-show="current == 2">完成设置</button>
				</view>
			</view>
		</view>
		<!-- 代理商 -->
		<u-popup v-model="agentShow" mode="bottom" height="80%">
			<view class="agentViewMain">
				<view class="agentViewHeader solid-bottom">
					<view class="backView flex align-center justify-center" @click="angentHideTap">
						<u-icon name="arrow-left" color="#333" size="32"></u-icon>
					</view>
					<text>请选择代理商</text>
				</view>
				<view class="agentViewSearch solid-bottom">
					<u-search placeholder="请输入手机号或代理商姓名" v-model="searchAgent" :show-action="false" shape="square"
						@change="searchTap('searchAgent')"></u-search>
					<text style="color:#f33;display:block;line-height:80rpx;font-weight:bold;">仅展示已实名代理商</text>
				</view>
				<view class="agentViewBox" v-if="renderData.agentList.length > 0">
					<view class="agentViewItem solid-bottom flex align-center justify-between"
						v-for="(item, index) in renderData.agentList" :key="index" @click="selectAgentTap(item, index)">
						<view>{{ item.real_name }}-{{ item.account }}</view>
						<view class="radioView" :class="currentAgent == index ? 'active' : ''"></view>
					</view>
				</view>
				<view class="noData flex align-center" v-else>
					<image src="../../static/images/noData/zwsh.png" mode="widthFix"></image>
					<text>暂无代理商</text>
				</view>
				<view class="agentBtnView"><button style="width: 100%" type="default" @click="angentHideTap">确定</button>
				</view>
			</view>
		</u-popup>
		<!-- 产品 -->
		<u-popup v-model="productShow" mode="bottom" height="50%">
			<view class="productViewMain">
				<view class="productViewHeader solid-bottom">
					<view class="backView flex align-center justify-center" @click="productHideTap">
						<u-icon name="arrow-left" color="#333" size="32"></u-icon>
					</view>
					<text>请选择产品</text>
					<view class="comfirmView" @click="productHideTap">完成</view>
				</view>
				<view class="productViewBox" v-if="renderData.productsList.length>0">
					<view class="productViewItem solid-bottom flex align-center justify-between"
						v-for="(item, index) in renderData.productsList" @click="selectProductTap(item, index)">
						<view>{{ item.name }}</view>
						<view class="radioView" :class="currentProduct == index ? 'active' : ''"
							v-if="item.user_product_id == '0'"></view>
						<view class="settingStatus" v-else>已设置</view>
					</view>
				</view>
				<view class="noData flex align-center" v-else style="padding-top:0;">
					<image src="../../static/images/noData/zwsh.png" mode="widthFix"></image>
					<text>暂无产品</text>
				</view>
			</view>
		</u-popup>
		<u-modal v-model="show" :content="content" show-cancel-button @confirm="confirm" @cancel="cancel" confirm-color="#fb4535"></u-modal>
		<u-modal v-model="qustionShow" :content="qustionContent" :title="qustionTitle" confirm-color="#fb4535"></u-modal>
		<u-top-tips ref="uTips"></u-top-tips>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				titleStyle: {
					color: '#333333',
					fontSize: '32rpx'
				},
				valueStyle: {
					color: '#666666',
					fontSize: '32rpx'
				},
				currentAgent: -1,
				searchAgent: '',
				currentProduct: -1,
				nuserId: '',
				productId: '',
				renderData: {
					agentValue: '请选择代理商',
					productValue: '请选择产品',
					agentList: [],
					productsList: [],
					dataProduct: {
						active_reward: '0.00',
						active_reward_min: '0.00',
						agent_code: '',
						alipay: '0.00',
						alipay_max: '0.00',
						ccpay: '0.00',
						ccpay_max: '0.00',
						cuppay: '0.00',
						cuppay_max: '0.00',
						dcpay: '0.00',
						dcpay_max: '0.00',
						dctop: '0.00',
						dctop_max: '0.00',
						wxpay: '0.00',
						machine_count: '0',
						name: '',
						product_id: '',
						service_fee: '0.00',
						t0: '0.00',
						user_product_id: '',
						service_data_fee: '0.00',
						service_data_fee_min: '0.00',
						standard_fee_1: '',
						standard_fee_2: '',
						standard_fee_3: '',
						standard_fee_1_remard:'',
						standard_fee_2_remard:''
					}
				},
				agentShow: false,
				productShow: false,
				queryData: {
					dcpay: '',
					dctop: '',
					ccpay: '',
					cuppay: '',
					alipay: '',
					wxpay: '',
					t0: '',
					active_reward: '',
					service_data_fee: '',
					standard_fee_1: '',
					standard_fee_2: '',
					standard_fee_3: ''
				},
				state: {
					dcpay: false,
					dctop: false,
					ccpay: false,
					cuppay: false,
					alipay: false,
					wxpay: false,
					active_reward: false,
					service_data_fee: false,
					standard_fee_1: false,
					standard_fee_2: false,
					standard_fee_3: false
				},
				tabList: [{
						name: '费率设置'
					},
					{
						name: '返现设置'
					},
					{
						name: '流量卡设置'
					}
				],
				current: 0,
				show: false,
				content: '确认当前设置吗？',
				qustionShow:false,
				qustionTitle:'',
				qustionContent:'',
				canNext:false
			};
		},
		onLoad() {
			this.getGetTransferUsers();
		},
		methods: {
			tabChange(index) {
				if (this.nuserId == '') {
					this.$refs.uTips.show({
						title: '请选择代理商',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				if (this.productId == '') {
					this.$refs.uTips.show({
						title: '请选择产品',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				this.current = index;
			},
			nextStepTap(index) {
				if (this.nuserId == '') {
					this.$refs.uTips.show({
						title: '请选择代理商',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				if (this.productId == '') {
					this.$refs.uTips.show({
						title: '请选择产品',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				this.current = index;
			},
			angentShowTap() {
				this.agentShow = true;
				this.searchAgent = '';
				this.productId = '';
				this.renderData.productValue = '请选择产品';
			},
			angentHideTap(){
				this.agentShow = false;	
			},
			productShowTap() {
				if (this.renderData.agentValue == '请选择代理商') {
					this.$refs.uTips.show({
						title: '请选择代理商',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				this.productShow = true;
			},
			productHideTap(){
				this.productShow = false;
				this.current =0
			},
			//获取代理列表
			getGetTransferUsers() {
				let code = uni.getStorageSync('loginInfo').third_session;
				this.$u.api
					.userlist({
						third_session: code,
						auth_status: 2
					})
					.then(res => {
						if (res.status == 200) {
							let datas = res.result.list;
							datas = this.$tools.aesDecryptBat(this, datas, 'account');
							this.renderData.agentList = datas;
						}
					});
			},
			//获取获取调拨代理对应的产品列表
			getTransferProducts(agentId) {
				this.nuserId = agentId;
				let code = uni.getStorageSync('loginInfo').third_session;
				this.$u.api
					.productlist({
						third_session: code,
						all: "2",
						user_id: agentId
					})
					.then(res => {
						if (res.status == 200) {
							let datas = res.result.list;
							this.renderData.productsList = datas;
						}
					});
			},
			searchTap() {
				this.getGetTransferUsers();
			},
			//选择类
			selectAgentTap(item, index) {
				this.currentAgent = index;
				this.renderData.agentValue = `${item.real_name}-${item.account}`;
				this.getTransferProducts(item.user_id);
				this.currentProduct = -1;
				this.current = 0;
			},
			selectProductTap(item, index) {
				if (item.user_product_id == 0) {
					this.currentProduct = index;
					this.renderData.productValue = item.name;
					this.renderData.dataProduct = item;
					this.productId = item.product_id;
				} else {
					this.$refs.uToast.show({
						title: '该产品已设置',
						type: 'error'
					});
				}
			},
			inputBlur(type, maxNum) {
				this.state[type] = false;
				if (this.nuserId == '') {
					this.$refs.uTips.show({
						title: '请选择代理商',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				if (this.productId == '') {
					this.$refs.uTips.show({
						title: '请选择产品',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				if (this.queryData[type] != '') {
					// if (type != 'active_reward') {
					// 	if (this.queryData[type] * 1000 < this.renderData.dataProduct[type] * 1000) {
					// 		this.$refs.uToast.show({
					// 			title: '不能低于自己',
					// 			type: 'error'
					// 		});
					// 		this.queryData[type] = '';
					// 	}
					// } 
					// if(type == 'active_reward'){
					// 	if (this.queryData[type] * 1000 >= this.renderData.dataProduct[type] * 1000) {
					// 		this.$refs.uToast.show({
					// 			title: '不能高于自己',
					// 			type: 'error'
					// 		});
					// 		this.queryData[type] = '';
					// 	}
					// }
					// if(type == 'standard_fee'){
					// 	if (this.queryData[type] * 1000 >= this.renderData.dataProduct[type] * 1000) {
					// 		this.$refs.uToast.show({
					// 			title: '不能高于自己',
					// 			type: 'error'
					// 		});
					// 		this.queryData[type] = '';
					// 	}
					// }
					if (this.queryData[type] < 0 || this.queryData[type] == '-0'){
						this.$refs.uToast.show({
							title: '不能为负值',
							type: 'error'
						});
						this.queryData[type] = '';
						return
					}

					if (this.queryData[type] * 1000 > maxNum * 1000 && type != 'active_reward' && type != 'standard_fee_1' && type != 'standard_fee_2' &&
						type != 'service_data_fee' && type != 't0') {
						this.$refs.uToast.show({
							title: '不能高于' + `${maxNum}`,
							type: 'error'
						});
						this.canNext = true;
						setTimeout(()=>{
							this.canNext = false;
						},1000)
						this.queryData[type] = '';
					} else if (this.queryData[type] * 1000 < this.renderData.dataProduct[type] * 1000 &&
						type != 'active_reward' && type != 'standard_fee_1' && type != 'standard_fee_2' && type != 'service_data_fee') {
						this.$refs.uToast.show({
							title: `不能低于${this.renderData.dataProduct[type]}`,
							type: 'error'
						});
						this.canNext = true;
						setTimeout(()=>{
							this.canNext = false;
						},1000)
						this.queryData[type] = '';
					} 
					else if (type == 't0' && this.queryData[type] * 1000 > maxNum *1000 ) {
						this.$refs.uToast.show({
							title: '不能高于' + `${maxNum}`,
							type: 'error'
						});
						this.canNext = true;
						setTimeout(()=>{
							this.canNext = false;
						},1000)
						this.queryData[type] = '';
					} 
					else if (type == 'active_reward' && this.queryData[type] * 1000 > this.renderData.dataProduct[type] *
						1000) {
						this.$refs.uToast.show({
							title: `不能高于${this.renderData.dataProduct[type]}`,
							type: 'error'
						});
						this.canNext = true;
						setTimeout(()=>{
							this.canNext = false;
						},1000)
						this.queryData[type] = '';
					} else if (type == 'standard_fee_1' && this.queryData[type] * 1000 > this.renderData.dataProduct[type] *
						1000) {
						this.$refs.uToast.show({
							title: `不能高于${this.renderData.dataProduct[type]}`,
							type: 'error'
						});
						this.canNext = true;
						setTimeout(()=>{
							this.canNext = false;
						},1000)
						this.queryData[type] = '';
					}else if (type == 'standard_fee_2' && this.queryData[type] * 1000 > this.renderData.dataProduct[type] *
						1000) {
						this.$refs.uToast.show({
							title: `不能高于${this.renderData.dataProduct[type]}`,
							type: 'error'
						});
						this.canNext = true;
						setTimeout(()=>{
							this.canNext = false;
						},1000)
						this.queryData[type] = '';
					} else if (type == 'service_data_fee' && this.queryData[type] * 1000 > this.renderData.dataProduct[
							type] * 1000) {
						this.$refs.uToast.show({
							title: `不能高于${this.renderData.dataProduct[type]}`,
							type: 'error'
						});
						this.canNext = true;
						setTimeout(()=>{
							this.canNext = false;
						},1000)
						this.queryData[type] = '';
					}
				}
			},
			inputTap(type) {
				this.state[type] = true;
			},

			//政策设定提交
			submitRateTap() {
				if (this.nuserId == '') {
					this.$refs.uTips.show({
						title: '请选择代理商',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				if (this.productId == '') {
					this.$refs.uTips.show({
						title: '请选择产品',
						type: 'info',
						duration: '1500'
					});
					return;
				}
				this.show = true;
			},

			confirm() {
				let params = {
					third_session: uni.getStorageSync('loginInfo').third_session,
					product_id: this.productId,
					user_id: this.nuserId,
					dcpay: this.queryData.dcpay ? this.queryData.dcpay : this.renderData.dataProduct.dcpay,
					dctop: this.queryData.dctop ? this.queryData.dctop : this.renderData.dataProduct.dctop,
					ccpay: this.queryData.ccpay ? this.queryData.ccpay : this.renderData.dataProduct.ccpay,
					cuppay: this.queryData.cuppay ? this.queryData.cuppay : this.renderData.dataProduct.cuppay,
					alipay: this.queryData.alipay ? this.queryData.alipay : this.renderData.dataProduct.alipay,
					wxpay: this.queryData.wxpay ? this.queryData.wxpay : this.renderData.dataProduct.wxpay,
					t0: this.queryData.t0 ? this.queryData.t0 : this.renderData.dataProduct.t0,
					active_reward: this.queryData.active_reward ? this.queryData.active_reward : this.renderData
						.dataProduct.active_reward,
					service_data_fee: this.queryData.service_data_fee ? this.queryData.service_data_fee : this
						.renderData.dataProduct.service_data_fee,
					standard_fee_1: this.queryData.standard_fee_1 ? this.queryData.standard_fee_1 : this.renderData
						.dataProduct.standard_fee_1,
					standard_fee_2: this.queryData.standard_fee_2 ? this.queryData.standard_fee_2 : this.renderData
							.dataProduct.standard_fee_2
				};
				let that = this;
				that.$u.api.userProductSetting(params).then(res => {
					if (res.status == 200) {
						that.$refs.uToast.show({
							title: res.result,
							type: 'success'
						});
						setTimeout(() => {
							that.$u.route({
								url: '/pages/myTeam/myTeam',
								type: 'redirect'
							});
						}, 2000);
					} else {
						that.$refs.uTips.show({
							title: res.msg,
							type: 'info',
							duration: '2000'
						});
					}
				});
			},

			cancel() {
				this.show = false;
			},
			showQustion(title,content){
				this.qustionShow=true,
				this.qustionTitle = title,
				this.qustionContent=content
			}
		}
	};
</script>

<style lang="scss">
	.policySettingBox {
		.policySettingOne {
			background-color: #fff;
		}

		.tip {
			line-height: 80rpx;
			color: #f33;
			font-size: 28rpx;
			padding: 0 32rpx;
		}

		.policySettingTwo {
			padding: 30rpx 32rpx 50rpx;

			.title {
				height: 100rpx;
				font-size: 36rpx;
				color: $uni-text-color;

				.uIcon {
					margin-right: 10rpx;
				}
			}

			.twoBox {
				background-color: #fff;
				border-radius: 10rpx;
				padding: 0 20rpx;
				margin-bottom: 30rpx;

				.formItem {
					height: 100rpx;
					padding: 0 30rpx;

					.left {
						>view{
							width: 200rpx;
							position: relative;
							top: -2rpx;
							font-size: 32rpx;
							color: $uni-text-color;
							margin-right: 30rpx;
							.uIcon{
								margin-left:10rpx;
								position:relative;
								top:1rpx;
							}
						}
						>text {
							display: block;
							font-size: 32rpx;
							color: $uni-text-color;
							margin-right: 30rpx;
							position: relative;

							
						}
					}

					.right {
						width: 30%;
						position: relative;
						top: 2rpx;

						>text {
							font-size: 36rpx;
							color: #fb4535;
							font-weight: bold;
						}
					}
				}
			}

			>.oButtonBox {
				position: fixed;
				left: 0;
				bottom: 0;
				padding: 30rpx;
				width: 100%;
				box-sizing: border-box;

				>button {
					background-color: #fb4535;
					font-size: 32rpx;
					color: #fff;
					width: 100%;

					&::after {
						border: none;
					}
				}
			}
		}
	}

	.agentViewMain {
		position: relative;

		.agentViewHeader {
			height: 80rpx;
			text-align: center;
			line-height: 80rpx;
			font-size: 32rpx;
			position: fixed;
			width: 100%;
			top: 0;
			left: 0;
			background-color: #fff;
			z-index: 9;

			.backView {
				width: 80rpx;
				height: 80rpx;
				position: absolute;
				left: 0;
				top: 0;
			}
		}

		.agentViewSearch {
			padding: 20rpx 30rpx 0;
			box-sizing: border-box;
			position: fixed;
			width: 100%;
			left: 0;
			top: 80rpx;
			background-color: #fff;
			z-index: 9;
		}

		.agentViewBox {
			padding: 244rpx 30rpx 120rpx;

			.agentViewItem {
				height: 100rpx;
			}
		}

		.agentBtnView {
			padding: 20rpx 30rpx;
			position: fixed;
			left: 0;
			bottom: 0;
			width: 100%;
			box-sizing: border-box;
			background-color: #fff;

			>button {
				background-color: #fb4535;
				font-size: 32rpx;
				color: #fff;

				&::after {
					border: none;
				}
			}
		}
	}

	.productViewMain {
		position: relative;

		.productViewHeader {
			height: 80rpx;
			text-align: center;
			line-height: 80rpx;
			font-size: 32rpx;
			position: fixed;
			width: 100%;
			top: 0;
			left: 0;
			background-color: #fff;
			z-index: 9;

			.backView {
				width: 80rpx;
				height: 80rpx;
				position: absolute;
				left: 0;
				top: 0;
			}

			.comfirmView {
				height: 80rpx;
				line-height: 80rpx;
				font-size: 28rpx;
				color: #fb4535;
				padding: 0 30rpx;
				position: absolute;
				right: 0;
				top: 0;
			}
		}

		.productViewBox {
			padding: 80rpx 30rpx 0;

			.productViewItem {
				height: 100rpx;
			}
		}
	}

	.settingStatus {
		font-weight: bold;
		color: #f33;
	}

	.radioView {
		width: 40rpx;
		height: 40rpx;
		border-radius: 50%;
		border: 2rpx solid #ccc;

		&.active {
			border-color: #fb4535;
			background-color: #fb4535;
			position: relative;

			&::before {
				content: '';
				display: block;
				width: 10rpx;
				height: 6rpx;
				background-color: #fff;
				transform: rotate(45deg);
				position: absolute;
				left: 6rpx;
				top: 18rpx;
			}

			&::after {
				content: '';
				display: block;
				width: 22rpx;
				height: 6rpx;
				background-color: #fff;
				transform: rotate(-45deg);
				position: absolute;
				left: 10rpx;
				top: 16rpx;
			}
		}
	}

	.noData {
		text-align: center;
		color: #ababab;
		flex-direction: column;
		padding-top: 150rpx;

		text {
			margin-top: -40rpx;
		}

		image {
			width: 250rpx;
		}
	}
</style>
